<template>
  <div class="chart-card">
    <div class="clearfix">
      <span>其他</span>
    </div>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="name" label="学校名称" />
      <el-table-column
        prop="avgScore"
        label="伙食补助(元/人//日)"
        align="right"
      />
      <el-table-column
        prop="targetScore"
        label="服装补助(元/人/年)"
        align="right"
      />
      <el-table-column
        prop="rank"
        label="文化课时(学时/周)"
        width="120"
        align="center"
      />
    </el-table>
  </div>
</template>

<script>
import { subsidy } from "@/api/statistics";
export default {
  data() {
    return {
      tableData: [
        {
          name: "河南省体育局",
          avgScore: "¥7,988.67",
          targetScore: "¥6,030.77",
          rank: "24"
        },
        {
          name: "北京体育大学",
          avgScore: "¥9,454.33",
          targetScore: "¥7,098.36",
          rank: "20"
        },
        {
          name: "辽宁省体育局",
          avgScore: "¥6,700.32",
          targetScore: "¥4,829.69",
          rank: "19"
        }
      ]
    };
  },
  methods: {
    getData() {
      subsidy().then(res => {
        this.tableData = res.data;
      });
    }
  },
  mounted() {
    this.getData();
  }
};
</script>

<style scoped>
.chart-card {
  height: 100%;
  background: #fff;
  border-radius: 4px;
  padding: 20px;
}

.chart-card .el-card__header {
  padding: 15px 20px;
  border-bottom: 1px solid #ebeef5;
}

.el-table th {
  background-color: #f5f7fa !important;
}

.clearfix {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
</style>
